package com.pencilisland.pay.api.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 交易订单
 * 
 * @author Breeze
 *
 */
@Entity
@Table(name = "PI_TRADE_ORDER")
public class TradeOrderEntity {
	/**
	 * 订单编号
	 */
	@Id
	@Column(name = "ORDER_NO", length = 100)
	private String orderNo;
	/**
	 * 商品ID
	 */
	@Column(name = "GOODS_ID")
	private Long goodsId;
	/**
	 * 交易数量
	 */
	@Column(name = "TRADE_NUM")
	private Integer tradeNum;
	/**
	 * 商品单价
	 */
	@Column(name = "UNIT_PRICE", scale = 2, precision = 16)
	private BigDecimal unitPrice;
	/**
	 * 总价
	 */
	@Column(name = "TOTAL_PRICE", scale = 2, precision = 16)
	private BigDecimal totalPrice;
	/**
	 * 订单价
	 */
	@Column(name = "ORDER_PRICE", scale = 2, precision = 16)
	private BigDecimal orderPrice;
	/**
	 * 支付方式
	 */
	@Column(name = "PAY_WAY", length = 20)
	private String payWay;
	/**
	 * 支付状态
	 */
	@Column(name = "PAY_STATUS")
	private Integer payStatus;
	/**
	 * 处理状态
	 */
	@Column(name = "STATUS")
	private Integer status;
	/**
	 * 预订单号
	 */
	@Column(name = "PREPAY_ID", length = 50)
	private String prepayId;
	/**
	 * 交易订单号
	 */
	@Column(name = "TRANSACTION_ID", length = 50)
	private String transactionId;
	/**
	 * 微信支付用户唯一ID
	 */
	@Column(name = "OPEN_ID", length = 50)
	private String openId;
	/**
	 * 微信用户昵称
	 */
	@Column(name = "NICK_NAME", length = 400)
	private String nickName;
	/**
	 * 创建时间
	 */
	@Column(name = "CREATE_TIME", length = 20)
	private String createTime;
	/**
	 * 完成时间
	 */
	@Column(name = "FINISH_TIME", length = 20)
	private String finishTime;
	
	/**
	 * 同步到mgt
	 */
	@Column(name = "SYNC_MGT", length = 20)
	private String syncMgt;
	
	/**
	 * 快递单号
	 */
	@Column(name = "TRACKING_NUMBER", length = 200)
	private String trackingNumber;

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public Long getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	public Integer getTradeNum() {
		return tradeNum;
	}

	public void setTradeNum(Integer tradeNum) {
		this.tradeNum = tradeNum;
	}

	public BigDecimal getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(BigDecimal unitPrice) {
		this.unitPrice = unitPrice;
	}

	public BigDecimal getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	public BigDecimal getOrderPrice() {
		return orderPrice;
	}

	public void setOrderPrice(BigDecimal orderPrice) {
		this.orderPrice = orderPrice;
	}

	public String getPayWay() {
		return payWay;
	}

	public void setPayWay(String payWay) {
		this.payWay = payWay;
	}

	public Integer getPayStatus() {
		return payStatus;
	}

	public void setPayStatus(Integer payStatus) {
		this.payStatus = payStatus;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getPrepayId() {
		return prepayId;
	}

	public void setPrepayId(String prepayId) {
		this.prepayId = prepayId;
	}

	public String getTransactionId() {
		return transactionId;
	}

	public void setTransactionId(String transactionId) {
		this.transactionId = transactionId;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(String finishTime) {
		this.finishTime = finishTime;
	}

	public String getSyncMgt() {
		return syncMgt;
	}

	public void setSyncMgt(String syncMgt) {
		this.syncMgt = syncMgt;
	}

	public String getTrackingNumber() {
		return trackingNumber;
	}

	public void setTrackingNumber(String trackingNumber) {
		this.trackingNumber = trackingNumber;
	}
}
